package com.example.administrator.kotlin.adapter

import android.widget.TextView
import com.bumptech.glide.Glide
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.example.administrator.kotlin.R
import com.example.administrator.kotlin.bean.Newslist

/**
 * Created by Administrator on 2018/3/5/005.
 */
class VerticalAdapter(news: ArrayList<Newslist>) : BaseQuickAdapter<Newslist, BaseViewHolder>(R.layout.item_text_image) {
    override fun convert(holder: BaseViewHolder, item: Newslist) {
        Glide.with(mContext)
                .load(item.picUrl)
                .into(holder.getView(R.id.imageview))

        holder.setText(R.id.tv_content, item.ctime)
    }

}